package com.xuelang.pipeline.app.pipeline.converter;

import com.xuelang.pipeline.client.pipeline.dto.GroupDTO;
import com.xuelang.pipeline.domain.pipeline.Group;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 流水线分组DTO与流水线分组实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface GroupDTOToGroupConverter {
    GroupDTOToGroupConverter INSTANCE = Mappers.getMapper(GroupDTOToGroupConverter.class);

    /**
     * Group转化为GroupDTO
     * @param group
     * @return
     */
    GroupDTO groupToGroupDTO(Group group);

    /**
     * GroupDTO转化为Group
     * @param groupDTO
     * @return
     */
    Group groupDTOToGroup(GroupDTO groupDTO);
}
